package com.itheima.utils;

public class BaseContext {

    public static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();
    public static ThreadLocal<String> threadLocal1 = new ThreadLocal<>();

    public static void setCurrentId(Integer id) {
        threadLocal.set(id);
    }

    public static Integer getCurrentId() {
        return threadLocal.get();
    }
    public static void setName(String name) {
        threadLocal1.set(name);
    }
    public static String getName(){
       return threadLocal1.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
